import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

import cash from './cash'; //现金应用页面路由
// const Login = resolve => require(['@/views/login'], resolve)
// 懒加载方式，当路由被访问的时候才加载对应组件

const router = new Router({
  routes: [
    {
      // 首页-收银页-开单
      path: '/',
      name: 'home',
      redirect: '/openOrder',
      component: resolve => void(require(['@/pages/home'], resolve)),
      children: [
        ...cash,
      ]
    },
    
    {
      path: '*',
      component: resolve => void(require(['@/components/404.vue'], resolve)),
    },
   
]
})

 
export default router

